package com.anyisn.anyflickr.modules.PhotoInfo
{
	import org.puremvc.as3.multicore.patterns.facade.Facade;
	
	import com.anyisn.anyflickr.modules.PhotoInfo.controller.*;
	
	public class PhotoInfoModuleFacade extends Facade
	{
		public static const STARTUP:String				= 'startup';
		
		public static const PHOTOS_GET_SIZES:String		= 'photosGetSizes';
		
		public static const GET_PHOTO_INFO_WINDOW:String	= 'getPhotoInfoWindow';
		
		public static const EXPORT_PHOTO_INFO_WINDOW:String	= 'exportPhotoInfoWindow';
		
		public function PhotoInfoModuleFacade(key:String)
		{
			super(key);
		}
		
		public static function getInstance(key:String):PhotoInfoModuleFacade {
			if(instanceMap[key] == null) 
				instanceMap[key] = new PhotoInfoModuleFacade(key);
			return instanceMap[key] as PhotoInfoModuleFacade;
		}
		
		override protected function initializeController() : void {
			super.initializeController();
			registerCommand(STARTUP, StartupCommand);
			registerCommand(PHOTOS_GET_SIZES, PhotosGetSizesCommand);
		}
		
		public function startup(app:PhotoInfoModule):void {
			sendNotification(STARTUP, app);
		}
	}
}